import CommonTag from '@/components/CommonTag';
import { Input } from 'antd';
import { ClipboardText, CommonText, DownTime, EditAbleText, NumText, StatusText } from '.';

const Demo = (props) => {
  const {} = props;
  return (
    <>
      <h3>NumText</h3>
      <p>
        <NumText num="1234567890" />
        <NumText num="122345" />
      </p>
      <p>
        <NumText num="100" suffix="kg" />
      </p>
      <p>
        <NumText num="10" pre="¥" />
      </p>
      <h3>CommonText</h3>
      <p>
        <CommonText text="我好中意吃节瓜" />
      </p>
      <h3>ClipboardText</h3>
      <p>
        <ClipboardText text="我好中意吃节瓜" />
      </p>
      <p>
        <ClipboardText text="我好中意吃节瓜" link={{ target: '_blank', href: 'https://www.baidu.com' }} />
      </p>
      <h3>StatusText</h3>
      <p>
        <StatusText type="success" text="已发货" />
      </p>
      <p>
        <StatusText type="info" text="已作废" />
      </p>
      <p>
        <StatusText type="error" text="异常" />
      </p>
      <p>
        <StatusText type="warning" text="待发货" />
      </p>
      <h3>DownTime</h3>
      <p>
        <DownTime time={1704042061000} renderOverTime={(time) => `已超过（${time}）`} renderBeforeTime={(time) => `剩余时间：${time}`} />
        <DownTime time={1727715661000} renderOverTime={(time) => `已超过（${time}）`} renderBeforeTime={(time) => `剩余时间：${time}`} />
      </p>
      <h3>EditAbleText</h3>
      <p>
        <EditAbleText
          text="我有一个会变的大节瓜"
          editFieldProps={{
            Component: Input,
            props: {
              placeholder: '你有没有节瓜',
            },
          }}
        />
        <EditAbleText
          text="我有一个不会变的大节瓜"
          onClick={() => {
          }}
        />
      </p>
      <h3>CommonTag</h3>
      <p>
        <CommonTag type="yishangchuan" />
        <CommonTag type="jingcang" />
      </p>
    </>
  );
};
export default Demo;
